<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
    <head>
        <title></title>
        <meta charset="utf-8">
        <meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
       <!-- <link rel="stylesheet" href="css/ui-btn.css">-->
        <link rel="stylesheet" href="css/ui-input.css">
        <link rel="stylesheet" href="css/ui-img.css">
        <!--<link rel="stylesheet" href="css/ui-list.css">-->
        <link rel="stylesheet" href="css/ui-base.css">
        <link rel="stylesheet" href="css/ui-box.css">
        <link rel="stylesheet" href="css/ui-color.css">
        <link rel="stylesheet" href="css/ui-res.css">
        <!--<link rel="stylesheet" href="css/common.css">-->
        <!--<link rel="stylesheet" href="css/yhn.css">
        <link rel="stylesheet" href="css/project/style.css">-->
        <script src="js/zy_control.js"></script>
        <script src="js/zy_click.js"></script>
        <script src="js/zy_json.js"></script>
		<script src="js/main.js"></script>
        <script src="js/init.js"></script>
		<script src="js/talkingdata.js"></script>
		<script src="js/appcan.js"></script>
        <style type="text/css">
        .reslgbg{background-image:url('images/lg-bg.jpg')!important;}
		
		.reslgaccount{background-image:url('images/login-account.png')!important; background-size:70%;}
		.reslgpwd{background-image:url('images/login-pwd.png')!important; background-size:60%;}
		.uinn-a1{padding:0.4em 1em;} 
		.rela_div{ position:relative;}
		.wh100{width:100%; height:100%;}
		.umw100{width:100%}
		.umh100{height:100%}
		#login_dialog{opacity:0;width:100%;height100%;position:absolute;left:0;top:0; background-color:#000; z-index:99; display:none;}
		.login_opc{opacity:0.5}
		#login_box{position:absolute;left:0; z-index:100;top:99999px;}

		.logo{width:13.75em;height:2.75em;margin-top:3em;margin-left:0.6em;}


		.uinn-a{padding:0.4em 1.8em;}
		.uinn-a1{padding:0.4em 1em;}
		.umar-t1{margin-top:0.9em;}
		.c-gra-s{border:1px solid rgba(47,58,82,0.6);box-shadow:0 1px 3px rgba(0,0,0,0.3) inset,0 1px 1px rgba(255,255,255,0.3);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.3) inset,0 1px 1px rgba(255,255,255,0.3);background-color:#8fc8eb;
		}
		.t-3c{color:#3c3c3d;}
		.c-red-m2{background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(251, 38, 32,0.8)),to(rgba(218,10,5, 0.8)));background-image: -webkit-linear-gradient(top, rgba(251, 38, 32,0.8) 0%,  rgba(218,10,5, 0.8) 100%);background-image: linear-gradient(top, rgba(251, 38, 32,0.8) 0%, rgba(218,10,5, 0.8) 100%) ;box-shadow:1px 1px 1px rgba(255,210,210,0.4) inset,-1px -1px 1px rgba(255,210,210,0.4) inset,0 2px 4px rgba(0,0,0,0.52);-webkit-box-shadow:1px 1px 1px rgba(255,210,210,0.4) inset,-1px -1px 1px rgba(255,210,210,0.4) inset,0 2px 4px rgba(0,0,0,0.52);}
.arrow-down {width: 0px;height: 0px;border-left: 11px solid #8fc8eb;border-right: 11px solid #8fc8eb;
    border-top: 15px solid #173e77;font-size: 0px;line-height: 0px;}
        </style>
    </head>
    <body class="um-vp  reslgbg ub-img7 " id="body" ontouchstart>
        <div id="page_0" class="up ub ub-ver " tabindex="0">
            <!--header结束--><!--content开始-->
            <div id="content" class="ub-f1 tx-l t-bla">
                <div class="uinn-a1 ub ub-ver">
                    <!--块容器开始-->
                    <div class="ub ub-ver t-bla ">
                        <div class="ub ub-ac ub-pc">
                            <div class="logo umar-b tx-c">
                                <img src="images/logo.png" class="ub-fh" />
                            </div>
                        </div>
                    </div>
                    <div class="uinn  umar-t1">
                        <ul class="c-gra-s ub ub-ac lis">
                            <li class="umw2 umh4 lis-icon ub-img reslgaccount" style="padding:0.5em 0.5em;"></li>
                            <li class="ub ub-f1">
                                <div class="ub-f1 uinput uinn4">
                                    <input placeholder="员工号" type="text" class="uc-a1 t-323232" id="username" value="" />
                                </div>
                            </li>
                        </ul>
                    </div>
                    <div class="uinn ">
                        <ul class="c-gra-s ub ub-ac lis">
                            <li class="umw2 umh4 lis-icon ub-img reslgpwd" style="padding:0.5em 0.5em;"></li>
                            <li class="ub ub-f1">
                                <div class="ub-f1 uinput uinn4">
                                    <input placeholder="密　码" type="password" class="uc-a1 t-323232" id="password" value="" />
                                </div>
                            </li>
                        </ul>
                    </div>
                    <div class="uinn umar-t1">
                        <div class=" tx-c uinn5 c-red-m2 uc-a11 t-wh "  ontouchstart="zy_touch('zvbtn-act')"  onclick="loginCkeck()">登录</div>
                    </div>
                    <div class="uinn">
                        <div class=" tx-c uinn5 c-red-m2 uc-a11 t-wh "  ontouchstart="zy_touch('zvbtn-act')"  onclick="exitApp()">退出</div>
                    </div>
                </div>
            </div>
            <!--content结束-->
               
            </div>

    </body>
    <script>
        zy_init();
		window.uexOnload = function(type){
			if (!type) {
				exitreturn();
			}
		}
		function loginCkeck(){
		 
			IC.talkingDataCount("移动地服登陆","0000");
			var username = $$("username").value;
			var password = $$("password").value;
			 
			if (username == "") {
				$toast("请输入员工号", 2000);
				return false;
			}
			else 
				if (password == "") {
					$toast("请输入密码", 2000);
					return false;
				}
				else {
					//http://localhost:8080/ceair/GetUserInfo?act=GetUserInfo&UID=001&PWD=111111
					//开始登录验证
					appcan.window.openToast("请稍后...","",5,1);
					var url="http://mumobile30.ceair.com/mas/sdk10098/public/appCenter/loginJoint";
					Loading(0);
					var idata =[{'key':'username','type':'0','value':username} , {'key':'password','type':'0','value':password}];
					var jsonPage = [{
						'key': 'act',
						'type': '0',
						'value': 'GetUserInfo'
					}, {
						'key': 'UID',
						'type': '0',
						'value': username
					}, {
						'key': 'PWD',
						'type': '0',
						'value': password
					}];
					$.getJSON(url , function(json){
//						alert(json)
						Loading(-1);
						if(json.status=='-1')
						{
							$toast("员工号或密码不正确", 3000);
						}
						else
						{
//							jsonR = JSON.parse(json);
							
							localStorage.setItem("ZV_EMPLOYEE_NUMBER",username);
//							localStorage.setItem("ZV_Account",jsonR.Account);
//							localStorage.setItem("ZV_UserName",jsonR.UserName);
//							localStorage.setItem("ZV_Department",jsonR.Department);
							var path =	localStorage.getItem("MU3~StartPage");
							//alert(path)

					        if(path){
								var name = path.replace(".html","").replace(/^\s+|\s+$/g,"");
								path = path.replace(/^\s+|\s+$/g,"");
								var p1="candidateInput.html";
								var p2="candidateUpgrade.html";
								var p3="candidateDowngrades.html";
								var p4="volunteer.html";
								var p5="passengerServicePage.html";
								if(path==p1||path==p2||path==p5||path==p3||path==p4)    //若是候补升舱，提交用户名密码判断是否有登陆权限
								{
							 		var loginUrl = "http://mpservice.ceair.com/mpservice/login_mpservice.action?loginName="+username;
									 $.getJSON(loginUrl, function(json){
									 			if(json.status==0)
												{
														var str=json.array.AppRole;
														if(path==p1&&str.indexOf('15')>-1)
														{
															openNewWin(name,path);
														}
														else if(path==p2&&str.indexOf('16')>-1)
														{
															openNewWin(name,path);
														}else if(path==p5&&(str.indexOf('15')>-1||str.indexOf('16')>-1||str.indexOf('19')>-1||str.indexOf('20')>-1))
														{

															appcan.locStorage.setVal("loginName",username);
															openNewWin(name,path);

														}
														else{
															$toast("没有权限！", 2000);
														}
												}
												
												
										 }, "json",function(err){
//												 getJSONError(err);
											});
								}
							    else
								{
									openNewWin(name,path);
								}
							}
						}
					}, "json", function(e){
					}, "POST", idata, false);
				}
		}

    </script>
</html>
